package com.huanxing.cloud.pay.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 支付订单
 *
 * @author lijx
 * @since 2022/3/18 10:07
 */
@Data
@ApiModel(description = "支付订单")
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName(value = "pay_trade_order")
public class PayTradeOrder extends Model<PayTradeOrder> {

	@ApiModelProperty(value = "PK")
	@TableId(type = IdType.ASSIGN_ID)
	private String id;

	@ApiModelProperty(value = "渠道号")
	private String channelMchId;

	@ApiModelProperty(value = "商户订单号")
	private String outTradeNo;

	@ApiModelProperty(value = "订单描述")
	private String description;

	@ApiModelProperty(value = "交易类型")
	private String tradeType;

	@ApiModelProperty(value = "用户id（openid、支付宝buyerId）")
	private String openId;

	@ApiModelProperty(value = "支付状态：0.待支付；1.已支付；")
	private String payStatus;

	@ApiModelProperty(value = "渠道订单号")
	private String channelOrderNo;

	@ApiModelProperty(value = "额外参数")
	private String extra;

	@ApiModelProperty(value = "渠道支付错误码")
	private String errCode;

	@ApiModelProperty(value = "渠道支付错误描述")
	private String errMsg;

	@ApiModelProperty(value = "支付成功时间")
	private String paySuccessTime;

	@ApiModelProperty(value = "创建时间")
	private LocalDateTime createTime;

	@ApiModelProperty(value = "更新时间")
	private LocalDateTime updateTime;

	@ApiModelProperty(value = "逻辑删除：0、显示；1、隐藏")
	private String delFlag;

	@ApiModelProperty(value = "租户id")
	private String tenantId;

	@ApiModelProperty(value = "通知地址")
	private String notifyUrl;

	@ApiModelProperty(value = "金额")
	private BigDecimal amount;

	@ApiModelProperty(value = "同步跳转地址，仅支持http/https")
	private String returnUrl;

	@ApiModelProperty(value = "用户付款中途退出返回商户网站的地址")
	private String quitUrl;

}
